{include file='public/head'}
<body>
<style type="text/css" media="screen">
header {
    color: black;
}
</style>


<div class="x-body" >
	<form class="layui-form">

		<input type="hidden" name="id" value="{$id}">
		
		<div class="layui-form-item">
                <label class="layui-form-label">
                   管理员
                </label>
                <div class="layui-input-block">
                    <select  value="{$gly_id}"  name="guan_li_yuan_id" id='guan_li_yuan_id'>
					{volist name="guanLiYuans" id="vo"}
					<option  value="{$vo.id}" {eq name="$gly_id" value="$vo.id"}selected{/eq}>{$vo.username}</option>
					{/volist}
                    </select>
                </div>
        </div>

		<div class="layui-form-item">
		    <div class="layui-input-block">
		      <button style="margin-left: 20%" class="layui-btn" lay-submit="" lay-filter="editSubmit">重新分配</button>
		      <button id="reset" type="reset" class="layui-btn layui-btn-primary">重置</button>
		    </div>
		</div>


	</form>
</div>
</body>
<script>
	layui.use('form', function () {
	var form = layui.form,
	jq = layui.jquery;
	form.on('submit(editSubmit)', function (data) {
	loading = layer.load(2, {
		shade: [0.2, '#000']
	});
	var param = data.field;
	jq.post('updateGaunLiYuan', param, function (data) {
	if (data.code == 200) {
		layer.close(loading);
		layer.msg(data.msg, { icon: 1, time: 2000 }, function () {
		var index = parent.layer.getFrameIndex(window.name);
		parent.layer.close(index);
		});
	} else {
		layer.close(loading);
		layer.msg(data.msg, { icon: 2, time: 2000 });
	}
	});
	return false;
	});
	})
</script>
